<template>
	<view class="statement">
		<view class="repair_main" v-for="(item,index) in arrList" :key="index">
			<view class="title" v-if="item.title!=''">
				<view class="repair-left" />
				<text>{{item.title}}</text>
			</view>
			<view class="title2" v-if="item.title2&&item.title2!=''">
				<text>{{item.title2}}</text>
			</view>
			<view class="card-detail">
				<view class="ful-detail">
					<view class="detail-left">{{item.name}}</view>
					<view class="detail-right" v-if="item.form_type == 'text'"
						:style="{backgroundColor:isPdf?'#fff':'#F5F6F8'}">
						<u--textarea border="none" v-model="item.value" auto-height height="40" :disabled="isPdf"
						placeholder=" " autoHeight placeholder-style="font-size: 28rpx;color: #999999;backgroundColor:#999999;" />
					</view>
					<view class="border_" v-if="isPdf" />
					<view class="detail-right" v-if="item.form_type == 'select'"
						:style="{backgroundColor:isPdf?'#fff':'#F5F6F8'}">
						<view style="flex: 1;">
							<radio-group @change="(e)=>changeR(e,index)">
								<label style="margin-right: 20px;" v-for="(i,ind) in item.setting">
									<radio :value="i" :checked="item.value==(ind+1)" :disabled="isPdf">{{i}}</radio>
								</label>
							</radio-group>
						</view>
					</view>
					<view class="border_" v-if="isPdf" />
					<view class="detail-right" v-if="item.form_type == 'select2'"
						:style="{backgroundColor:isPdf?'#fff':'#F5F6F8'}">
						<view class="dis f_13" v-for="(i,ind) in item.setting">
							<view class="">{{i.set_name}}</view>
							<view class="">
								<view style="flex: 1;">
									<radio-group>
										<label style="margin-right: 20px;" v-for="(j,jin) in i.value">
											<radio :value="j">{{j}}</radio>
										</label>
									</radio-group>
								</view>
							</view>
						</view>
					</view>
					<view class="border_" v-if="isPdf" />
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			arrList: {
				type: Array,
				default: [{
						form_type: "text",
						title: "保养前系统状态检查",
						title2: "",
						name: "客户主诉",
						setting: [],
						value: ""
					},
					{
						form_type: "select",
						title: "",
						title2: "",
						name: "功能检查及系统评价",
						setting: ["✔", "/"],
						value: ""
					}, {
						form_type: "text",
						title: "",
						title2: "",
						name: "检查故障信息及 故障代码摘录（如有必要，拷贝相应的故障记录）",
						setting: [],
						value: ""
					}, {
						form_type: "text",
						title: "",
						title2: "",
						name: "X-射线管曝光计数",
						setting: [],
						value: ""
					}, {
						form_type: "select",
						title: "",
						title2: "",
						name: "备份系统设置(backup)及器官程序",
						setting: ["✔", "/"],
						value: ""
					},
					{
						form_type: "select",
						title: "预防性保养",
						title2: "1.高压发生器",
						name: "分析错误代码",
						setting: ["✔", "/"],
						value: ""
					},

					{
						form_type: "select",
						title: "",
						title2: "",
						name: "检查旋转阳极控制线在球管处接线（不要与外壳短路）",
						setting: ["✔", "/"],
						value: ""
					},
					{
						form_type: "select",
						title: "",
						title2: "",
						name: "外接设备、电压检查（外接门灯，门开关）",
						setting: ["✔", "/"],
						value: ""
					}, {
						form_type: "select",
						title: "",
						title2: "",
						name: "检查高压电缆的屏蔽及高压棒",
						setting: ["✔", "/"],
						value: ""
					},
					{
						form_type: "select",
						title: "",
						title2: "",
						name: "检查球管阴极外壳螺丝",
						setting: ["✔", "/"],
						value: ""
					},
					{
						form_type: "select",
						title: "",
						title2: "",
						name: "曝光指示（指示灯，声音）检测",
						setting: ["✔", "/"],
						value: ""
					},
					{
						form_type: "select",
						title: "",
						title2: "",
						name: "训球管",
						setting: ["✔", "/"],
						value: ""
					},
					{
						form_type: "select",
						title: "",
						title2: "2.CM/DST床",
						name: "检查升降安全限位开关",
						setting: ["✔", "/"],
						value: ""
					},
					{
						form_type: "select",
						title: "",
						title2: "",
						name: "紧急开关检查",
						setting: ["✔", "/"],
						value: ""
					},
					{
						form_type: "select",
						title: "",
						title2: "",
						name: "接触安全装置检查",
						setting: ["✔", "/"],
						value: ""
					},
					{
						form_type: "select",
						title: "",
						title2: "",
						name: "床底脚踢开关功能检查",
						setting: ["✔", "/"],
						value: ""
					},
					{
						form_type: "select",
						title: "",
						title2: "3.胸片架",
						name: "检查平板托架运动范围",
						setting: ["✔", "/"],
						value: ""
					},
					{
						form_type: "select",
						title: "",
						title2: "",
						name: "运动控制功能检查",
						setting: ["✔", "/"],
						value: ""
					},
					{
						form_type: "select",
						title: "",
						title2: "",
						name: "紧急开关功能",
						setting: ["✔", "/"],
						value: ""
					},
					{
						form_type: "select",
						title: "",
						title2: "",
						name: "滤线栅传感器检查",
						setting: ["✔", "/"],
						value: ""
					},
					{
						form_type: "select",
						title: "",
						title2: "",
						name: "平板检测开关",
						setting: ["✔", "/"],
						value: ""
					},
					{
						form_type: "select",
						title: "",
						title2: "4.平板",
						name: "平板校准",
						setting: ["✔", "/"],
						value: ""
					}, {
						form_type: "select",
						title: "",
						title2: "",
						name: "图像质量测试（IQ report）",
						setting: ["✔", "/"],
						value: ""
					},
					{
						form_type: "select",
						title: "",
						title2: "5.系统保护接地检测",
						name: "接地保护电阻测试",
						setting: ["✔", "/"],
						value: ""
					},
					{
						form_type: "select",
						title: "",
						title2: "",
						name: "检查床体接地电阻（≤200mΩ）mΩ",
						setting: ["✔", "/"],
						value: ""
					},
					{
						form_type: "select",
						title: "",
						title2: "",
						name: "检查管球接地电阻（≤200mΩ）mΩ",
						setting: ["✔", "/"],
						value: ""
					},
					{
						form_type: "select",
						title: "",
						title2: "",
						name: "检查系统柜接地电阻（≤200mΩ）mΩ",
						setting: ["✔", "/"],
						value: ""
					},
					{
						form_type: "select",
						title: "",
						title2: "",
						name: "检查发生器柜接地电阻（≤200mΩ）mΩ",
						setting: ["✔", "/"],
						value: ""
					},
					{
						form_type: "select",
						title: "",
						title2: "",
						name: "检查数字系统接地电阻（≤200mΩ）mΩ",
						setting: ["✔", "/"],
						value: ""
					},
					{
						form_type: "select",
						title: "",
						title2: "",
						name: "检查变压器接地电阻（≤200mΩ）mΩ",
						setting: ["✔", "/"],
						value: ""
					},
					{
						form_type: "select",
						title: "",
						title2: "",
						name: "检查控制台接地电阻（≤200mΩ）mΩ",
						setting: ["✔", "/"],
						value: ""
					},
					{
						form_type: "select",
						title: "",
						title2: "",
						name: "检查遮光器接地电阻（≤200mΩ）mΩ",
						setting: ["✔", "/"],
						value: ""
					},
					{
						form_type: "select",
						title: "",
						title2: "",
						name: "检查胸片架接地电阻（≤200mΩ）mΩ",
						setting: ["✔", "/"],
						value: ""
					},
					 {
						form_type: "text",
						title: "质量确认及保养总结",
						title2: "",
						name: "保养中发现的问题",
						setting: [],
						value: ""
					}
				]
			},
			isPdf: {
				type: Boolean,
				default: false
			},
		},
		data() {
			return {
			}
		},

		methods: {
			changeR(e, index) {
				this.arrList[index].value = e.detail.value == '✔' ? 1 : 2
			},
			getArr() {
				this.$emit('geArr', this.arrList)
			}
		}
	}
</script>

<style lang="scss" scoped>
	.repair_main {
		margin: 20rpx 0;
		background-color: #fff;
		border-radius: 20rpx;
		overflow: hidden;
	}

	.repair-left {
		width: 10rpx;
		height: 32rpx;
		margin-right: 10rpx;
		background-color: #1A66FF;
	}

	.title {
		padding: 16rpx 12rpx;
		background-color: #fff;
		font-size: 32rpx;
		font-family: PingFang SC-Regular, PingFang SC;
		font-weight: 600;
		color: #434343;
		display: flex;
		align-items: center;
		justify-content: flex-start;
	}

	.title2 {
		padding: 12rpx;
		background-color: #fff;
		font-size: 28rpx;
		font-family: PingFang SC-Regular, PingFang SC;
		font-weight: 600;
		color: #434343;
		display: flex;
		align-items: center;
		justify-content: flex-start;
	}

	.border_ {
		height: 2rpx;
		background-color: #EBEEF1;
	}

	.dis {
		display: flex;
		align-items: center;
		justify-content: space-between;
	}

	.f_13 {
		font-size: 26rpx;
		margin-bottom: 16rpx;
	}

	.card-detail {
		background-color: #FFFFFF;

		.ful-detail {
			margin: 0 10rpx;
			padding: 20rpx 10rpx 6rpx;

			.detail-left {
				font-size: 28rpx;
				font-weight: 500;
				margin-bottom: 14rpx;
				color: #3B3D3D;
				line-height: 33rpx;
			}

			.detail-right {
				font-size: 28rpx;
				font-weight: 500;
				color: #000;
				padding: 14rpx 20rpx;
				line-height: 50rpx;
			}
		}
	}

	/* 设置input框提示内容的样式 */
	input::-webkit-input-placeholder {
		color: #434343;
	}

	/*webkit 内核浏览器*/
	input::-moz-placeholder {
		color: #434343;
	}

	/*Mozilla Firefox 19+*/
	input:-moz-placeholder {
		color: #434343;
	}

	/*Mozilla Firefox 4 to 18*/
	input:-ms-input-placeholder {
		color: #434343;
	}

	/* 设置textarea框提示内容的样式 */
	textarea::-webkit-input-placeholder {
		color: #434343;
	}

	/*webkit 内核浏览器*/
	textarea::-moz-placeholder {
		color: #434343;
	}

	/*Mozilla Firefox 19+*/
	textarea:-moz-placeholder {
		color: #434343;
	}

	/*Mozilla Firefox 4 to 18*/
	textarea:-ms-input-placeholder {
		color: #434343;
	}

	/deep/ .xp-picker-mask {
		z-index: 222;
	}
</style>